<?php

class StatisticsController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function highscoreAction()
    {
    	$result = new Default_Model_Yatzy_Xresult();
        $this->view->statistics = $result->getTopTen();
		$this->view->header = Zend_Registry::get('translate')->_('HIGHSCORE');
		$this->view->listValue = Zend_Registry::get('translate')->_('POINTS');
		$this->render('index');
    }
	
	public function topplayersAction()
	{
		$result = new Default_Model_Yatzy_Xresult();
		$this->view->statistics = $result->getTopPlayers();
		$this->view->header = Zend_Registry::get('translate')->_('TOP_PLAYERS');
		$this->view->listValue = Zend_Registry::get('translate')->_('POINTS');
		$this->render('index');
	}
	
	public function getaverageAction()
	{
		$result = new Default_Model_Yatzy_Xresult();
		$this->view->statistics = $result->getAverage();
		$this->view->header = Zend_Registry::get('translate')->_('AVERAGE_POINTS');
		$this->view->listValue = Zend_Registry::get('translate')->_('POINTS');
		$this->render('index');
	}
	
	public function gamesplayedAction()
	{
		$result = new Default_Model_Yatzy_Xresult();
		$this->view->statistics = $result->getGamesPlayed();
		$this->view->header = Zend_Registry::get('translate')->_('GAMES_PLAYED');
		$this->view->listValue = Zend_Registry::get('translate')->_('GAMES_PLAYED');
		$this->render('index');
	}
	
    


}

